/*
Copyright [2020] [https://www.xiaonuo.vip]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Snowy采用APACHE LICENSE 2.0开源协议，您在使用过程中，需要注意以下几点：

1.请不要删除和修改根目录下的LICENSE文件。
2.请不要删除和修改Snowy源码头部的版权声明。
3.请保留源码和相关描述文件的项目出处，作者声明等。
4.分发源码时候，请注明软件出处 https://gitee.com/xiaonuobase/snowy
5.在修改包名，模块名称，项目代码等时，请注明软件出处 https://gitee.com/xiaonuobase/snowy
6.若您的项目无法满足以上几点，可申请商业授权，获取Snowy商业授权许可，请在官网购买授权，地址为 https://www.xiaonuo.vip
 */
package vip.xiaonuo.facedoor.modular.visitor.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import vip.xiaonuo.core.pojo.base.entity.BaseEntity;

import java.util.Date;

/**
 * 访客
 *
 * @author 胡鹏达
 * @date 2022-07-25 09:34:39
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("dw_visitor")
@Accessors(chain = true)
@ApiModel(value = "访客详细信息")
public class Visitor extends BaseEntity {

    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "id")
    private Long id;

    /**
     * 邀请人id
     */
    @ApiModelProperty(value = "邀请人id")
    private Long inviterId;

    /**
     * 邀请人，病人姓名
     */
    @ApiModelProperty(value = "邀请人")
    private String inviterName;

    /**
     * 被访问电话
     */
    @ApiModelProperty(value = "被访人电话")
    private String inviterPhone;

    /**
     * 被访人公司
     */
    @ApiModelProperty(value = "被访人公司")
    private String inviterCompanyName;

    /**
     * 公司ID
     */
    @ApiModelProperty(value = "公司ID")
    private Long companyId;

    /**
     * 公司
     */
    @ApiModelProperty(value = "到访公司")
    private String companyName;

    /**
     * 访客组
     */
    @ApiModelProperty(value = "访客组ID")
    private Long orgId;

    /**
     * 结束访问时间
     */
    @Excel(name = "结束访问时间", databaseFormat = "yyyy-MM-dd HH:mm:ss", format = "yyyy-MM-dd", width = 20)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "结束访问时间")
    private Date visitEndDate;

    /**
     * 开始访问时间
     */
    @Excel(name = "开始访问时间", databaseFormat = "yyyy-MM-dd HH:mm:ss", format = "yyyy-MM-dd", width = 20)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "开始访问时间")
    private Date visitStartDate;

    /**
     * 用户名
     */
    @ApiModelProperty(value = "用户名")
    private String name;

    /**
     * 性别
     */
    @ApiModelProperty(value = "性别")
    private Integer sex;

    /**
     * 手机号
     */
    @ApiModelProperty(value = "手机号")
    private String tel;

    /**
     * 审核状态  1:审核通过，2:审核拒绝 ，3，未审批，0：已过期
     */
    @ApiModelProperty(value = "审核状态 1:审核通过，2:审核拒绝 ，3，未审批，0：已过期 4,已经离场")
    private String status;

    /**
     * 邮箱
     */
    @ApiModelProperty(value = "邮箱")
    private String email;

    /**
     * 全名
     */
    @ApiModelProperty(value = "全名")
    private String fullName;

    /**
     * 人脸比对照片
     */
    @ApiModelProperty(value = "人脸比对照片")
    private String photo;

    /**
     * 身份证号
     */
    @ApiModelProperty(value = "身份证号")
    private String idCard;

    /**
     * IC卡号
     */
    @ApiModelProperty(value = "IC卡号")
    private String icCard;

    /**
     * 人脸特征值
     */
    @ApiModelProperty(value = "人脸特征值")
    private String properValue;

    /**
     * 默认值为0，修改后值为1
     */
    @ApiModelProperty(value = "默认值为0，修改后值为1")
    private Integer statusFlag;

    /**
     * 指静脉
     */
    @ApiModelProperty(value = "指静脉")
    private String fingerVein;

    /**
     * 韦根卡号
     */
    @ApiModelProperty(value = "韦根卡号")
    private String wiegandNum;

    /**
     * 二维码
     */
    @ApiModelProperty(value = "二维码")
    private String qrCode;

    /**
     * 访客体温
     */
    @ApiModelProperty(value = "访客体温")
    private String temperature;

    /**
     * 身份证照片
     */
    @ApiModelProperty(value = "身份证照片")
    private String identityPhoto;

    /**
     * 核酸检测报告照片
     */
    @ApiModelProperty(value = "核酸检测报告照片")
    private String detectionPhoto;

    /**
     * 医院出具信息照片
     */
    @ApiModelProperty(value = "医院出具信息照片")
    private String providePhoto;

    /**
     * 家庭住址
     */
    @ApiModelProperty(value = "家庭住址")
    private String homeAddress;

    /**
     * 病人编号
     */
    @ApiModelProperty(value = "病人编号")
    private String patientId;

    /**
     * 病人姓名
     */
    @ApiModelProperty(value = "病人姓名")
    private String patientName;

    /**
     * 病人病区
     */
    @ApiModelProperty(value = "病人病区")
    private String patientArea;

    /**
     * 到访事由
     */
    @ApiModelProperty(value = "到访事由")
    private String visitReason;

    /**
     * 到访备注
     */
    @ApiModelProperty(value = "到访备注")
    private String visitRemake;

    /**
     * 审批备注
     */
    @ApiModelProperty(value = "审批备注")
    private String approvalRemake;

    /**
     * 是否过期
     */
    @ApiModelProperty(value = "是否过期")
    private Boolean expired;

    @ApiModelProperty(value = "辑删除标记（0：显示；1：隐藏）")
    private String delFlag;

    // MQTT专用
    @TableField(exist = false)
    private Long memberOrVisitorDeviceId;

    // 1 人员 2 访客
    @TableField(exist = false)
    private Integer memberType;

    // 来源 1 后台录入 2 小程序 3访客机
    @ApiModelProperty(value = "来源 1 后台录入 2 小程序 3访客机")
    private Integer source;

    // 访客机id
    @ApiModelProperty(value = "访客机id")
    private Long visitorDeviceId;

    @ApiModelProperty(value = "访问地址")
    private String visitorAddress;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "离场时间")
    private Date leaveTime;

    @ApiModelProperty(value = "车牌号码")
    private String carNum;

    @ApiModelProperty(value = "携带物品")
    private String carryItems;

    @ApiModelProperty(value = "质押证件")
    private String pledgeCertificate;

    @ApiModelProperty(value = "备注信息")
    private String remarks;

    @ApiModelProperty(value = "是否已经发放凭证 0已发放 1未发放")
    private Integer issuanceOfVouchers;

    @ApiModelProperty(value = "小程序审批人id")
    private Long approvalId;

    @ApiModelProperty(value = "访客机审批人id")
    private Long backApprovalId;

    private Boolean upToStaris;

    private Integer wgFacilityCode;

    @ApiModelProperty(value = "访客机生成二维码str")
    @TableField(exist = false)
    private String qrStr;

    private Boolean pushFlag;
}
